<?php



function loadDbConnection(){
  $host = '127.0.0.1';
  $port = '3306';
  $user = 'root';
  $pass = 'talasam';
  $schema = 'wc2010';
  require_once 'DB.php';

	// Data Source Name: This is the universal connection string
	$dsn = "mysql://$user:$pass@$host/$schema";

	// DB::connect will return a PEAR DB object on success
	// or an PEAR DB Error object on error

	$db = DB::connect($dsn);

	// With DB::isError you can differentiate between an error or
	// a valid connection.
	if (DB::isError($db)) {
		die ($db->getMessage());
	}
	return $db;
}

?>